import request from './request'
export function queryspec (mchtId) {
    return request({
      url: '/console/spec/querySpec.do',
      method: 'POST',
      body: {mchtId}
    })
  }
export function query ({currentPage = 1, perPage = 10,mchtId} = {}) {
  return request({
    url: '/console/spec/specList.do',
    method: 'POST',
    body: {currentPage, perPage,mchtId}
  })
}

export function create ({specName, parentId,mchtId}={}) {
  return request({
    url: '/console/spec/addSpec.do',
    method: 'POST',
    body: {specName, parentId,mchtId}
  })
}

export function edit ({id, specName, parentId,mchtId}={}) {
  return request({
    url: '/console/spec/editSpec.do',
    method: 'POST',
    body: {id, specName, parentId,mchtId}
  })
}

export function del ({id,mchtId}) {
  return request({
    url: '/console/spec/deleteSpec.do',
    method: 'POST',
    body: {id,mchtId}
  })
}

export function select ({mchtId}) {
    return request({
      url: '/console/spec/querySpecCombo.do',
      method: 'POST',
      body: {mchtId}
    })
  }

